finding the GCD